import { message } from 'antd'
import axios, { AxiosRequestConfig } from 'axios'
// 判断是否是开发环境
const isDev = process.env.NODE_ENV === 'development'
 const ins = axios.create({
   baseURL: isDev ? 'http://localhost:8877' :'http://localhost:8877' ,
   timeout:5000
 })

 ins.interceptors.request.use((config) => {
    return config
}, (err) => {
    return Promise.reject(err)
})

ins.interceptors.response.use((res) => {
    return res
}, (err) => {
    return Promise.reject(err)
})

export default ins
